﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Ecommerce.Model
{
    public class TransportadoraModel:BaseData
    {
        private static TransportadoraModel instance;

        private TransportadoraModel()
        {

        }

        public static TransportadoraModel Instance
        {
            get
            {
                if (instance == null)
                    instance = new TransportadoraModel();
                
                return instance;
            }
        }

        public tb_tra_transportadora Obter(string codigoTransportadora)
        {
            using (EcommerceEntities db = new EcommerceEntities(this.InicializarStringConexao(), false))
                return db.tb_tra_transportadora.Where(x => x.tra_cod_transportadora.Equals(codigoTransportadora)).FirstOrDefault();
        }
    }
}
